﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace mazaksmooth跨平台
{
	public class Mazak
	{
		// Token: 0x17000002 RID: 2
		// (get) Token: 0x06000019 RID: 25 RVA: 0x00005AE0 File Offset: 0x00003CE0
		public byte[] SendData
		{
			get
			{
				return this.StringByte("0800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
			}
		}

		// Token: 0x0600001A RID: 26 RVA: 0x00005B00 File Offset: 0x00003D00
		private byte[] StringByte(string str)
		{
			int num = str.Length / 2;
			byte[] array = new byte[num];
			for (int i = 0; i < num; i++)
			{
				array[i] = Convert.ToByte(str.Substring(i * 2, 2), 16);
			}
			return array;
		}

		// Token: 0x0600001B RID: 27 RVA: 0x00005B4C File Offset: 0x00003D4C
		public bool MazakConnect(string adrip, int port)
		{
			bool result;
			try
			{
				Mazak.socketClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
				Mazak.socketClient.Connect(adrip, port);
				bool connected = Mazak.socketClient.Connected;
				if (connected)
				{
					byte[] array = new byte[100];
					Mazak.ReceiveData(ref array, 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x0600001C RID: 28 RVA: 0x00005BB8 File Offset: 0x00003DB8
		public bool MazakDisConnect()
		{
			bool result;
			try
			{
				Mazak.socketClient.Disconnect(false);
				result = true;
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x0600001D RID: 29 RVA: 0x00005BF0 File Offset: 0x00003DF0
		public bool GetRunningInfo(ref Mazak.MTC_ONE_RUNNING_INFO mTC_ONE_RUNNING_INFO)
		{
			bool result;
			try
			{
				ushort value = 44;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 44);
				if (flag)
				{
					mTC_ONE_RUNNING_INFO.rpid_override = BitConverter.ToInt16(source.Skip(1312).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.ax_override = BitConverter.ToInt16(source.Skip(1310).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.sp_override = BitConverter.ToInt16(source.Skip(1308).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.ncsts = BitConverter.ToInt16(source.Skip(1290).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.ncmode = BitConverter.ToInt16(source.Skip(1288).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.almno = BitConverter.ToInt16(source.Skip(1314).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.prtcnt = BitConverter.ToInt16(source.Skip(1326).Take(2).ToArray<byte>(), 0);
					mTC_ONE_RUNNING_INFO.prtcnt_clamp = BitConverter.ToInt16(source.Skip(1324).Take(2).ToArray<byte>(), 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x0600001E RID: 30 RVA: 0x00005D94 File Offset: 0x00003F94
		public bool Get_Mainpro(ref Mazak.MTC_ONE_PROGRAM_INFO mTC_ONE_PROGRAM_INFO)
		{
			bool result;
			try
			{
				ushort value = 8;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 8);
				if (flag)
				{
					mTC_ONE_PROGRAM_INFO.wno = Encoding.GetEncoding("UTF-8").GetString(source.Skip(256).Take(33).ToArray<byte>());
					mTC_ONE_PROGRAM_INFO.comment = Encoding.GetEncoding("UTF-8").GetString(source.Skip(296).Take(49).ToArray<byte>());
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x0600001F RID: 31 RVA: 0x00005E6C File Offset: 0x0000406C
		public bool Get_SPindleInfo(ref Mazak.MTC_ONE_SPINDLE_INFO mTC_ONE_SPINDLE_INFO)
		{
			bool result;
			try
			{
				ushort value = 42;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 42);
				if (flag)
				{
					mTC_ONE_SPINDLE_INFO.rot = BitConverter.ToDouble(source.Skip(1288).Take(8).ToArray<byte>(), 0);
					mTC_ONE_SPINDLE_INFO.load = BitConverter.ToDouble(source.Skip(1296).Take(8).ToArray<byte>(), 0);
					mTC_ONE_SPINDLE_INFO.temp = BitConverter.ToDouble(source.Skip(1304).Take(8).ToArray<byte>(), 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000020 RID: 32 RVA: 0x00005F54 File Offset: 0x00004154
		public bool Get_Ctool(ref short toolnum)
		{
			bool result;
			try
			{
				ushort value = 15;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 15);
				if (flag)
				{
					toolnum = BitConverter.ToInt16(source.Skip(256).Take(2).ToArray<byte>(), 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000021 RID: 33 RVA: 0x00005FF4 File Offset: 0x000041F4
		public bool Get_Heartbeat()
		{
			bool result;
			try
			{
				ushort value = 50001;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] array = new byte[6000];
				bool flag = Mazak.ReceiveData(ref array, 50001);
				if (flag)
				{
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000022 RID: 34 RVA: 0x0000607C File Offset: 0x0000427C
		public bool Get_Alarm(ref string alarm)
		{
			bool result;
			try
			{
				ushort value = 24;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] array = new byte[6000];
				bool flag = Mazak.ReceiveData(ref array, 24);
				if (flag)
				{
					alarm = string.Concat(new string[]
					{
						array[1352].ToString(),
						"/",
						array[1353].ToString(),
						" ",
						array[1354].ToString(),
						":",
						array[1355].ToString(),
						"   msg:",
						BitConverter.ToInt16(array.Skip(1280).Take(2).ToArray<byte>(), 0).ToString(),
						Encoding.GetEncoding("x-cp20936").GetString(array.Skip(1400).Take(64).ToArray<byte>())
					});
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000023 RID: 35 RVA: 0x000061DC File Offset: 0x000043DC
		public bool GetAxisInfo(ref Mazak.MTC_ONE_AXIS_INFO mTC_ONE_AXIS_INFO)
		{
			bool result;
			try
			{
				ushort value = 41;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 41);
				if (flag)
				{
					mTC_ONE_AXIS_INFO.axisname_x = Encoding.GetEncoding("UTF-8").GetString(source.Skip(1346).Take(1).ToArray<byte>());
					mTC_ONE_AXIS_INFO.mc_pos_x = BitConverter.ToDouble(source.Skip(1360).Take(8).ToArray<byte>(), 0);
					mTC_ONE_AXIS_INFO.pos_x = BitConverter.ToDouble(source.Skip(1352).Take(8).ToArray<byte>(), 0);
					mTC_ONE_AXIS_INFO.axisname_z = Encoding.GetEncoding("UTF-8").GetString(source.Skip(1698).Take(1).ToArray<byte>());
					mTC_ONE_AXIS_INFO.mc_pos_z = BitConverter.ToDouble(source.Skip(1712).Take(8).ToArray<byte>(), 0);
					mTC_ONE_AXIS_INFO.pos_z = BitConverter.ToDouble(source.Skip(1704).Take(8).ToArray<byte>(), 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000024 RID: 36 RVA: 0x0000634C File Offset: 0x0000454C
		public bool Get_Macro(short address, ref double value)
		{
			bool result;
			try
			{
				ushort value2 = 53;
				byte[] sourceArray = new byte[2];
				byte[] bytes = BitConverter.GetBytes(address);
				sourceArray = BitConverter.GetBytes(value2).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Array.Copy(bytes, 0, sendData, 8, 2);
				Array.Copy(bytes, 0, sendData, 12, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 53);
				if (flag)
				{
					value = BitConverter.ToDouble(source.Skip(256).Take(8).ToArray<byte>(), 0);
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000025 RID: 37 RVA: 0x0000640C File Offset: 0x0000460C
		public bool Get_Remain(ref int[] data)
		{
			bool result;
			try
			{
				ArrayList arrayList = new ArrayList();
				ushort value = 6;
				byte[] sourceArray = new byte[2];
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Mazak.socketClient.Send(sendData);
				byte[] source = new byte[6000];
				bool flag = Mazak.ReceiveData(ref source, 6);
				if (flag)
				{
					for (int i = 0; i < 5; i++)
					{
						arrayList.Add(BitConverter.ToInt32(source.Skip(272 + i * 4).Take(4).ToArray<byte>(), 0));
					}
					data = (int[])arrayList.ToArray(typeof(int));
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000026 RID: 38 RVA: 0x000064F4 File Offset: 0x000046F4
		public bool Get_TDData(short tno, ref Mazak.MAZ_TDCOMPALL mAZ_TDCOMP)
		{
			bool result;
			try
			{
				mAZ_TDCOMP.offset = new Mazak.MAZ_TDCOMP[20];
				ushort value = 22;
				byte[] sourceArray = new byte[2];
				byte[] sourceArray2 = new byte[]
				{
					(byte)tno
				};
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Array.Copy(sourceArray2, 0, sendData, 8, 1);
				Mazak.socketClient.Send(sendData);
				Thread.Sleep(200);
				byte[] array = new byte[6000];
				bool flag = Mazak.ReceiveData(ref array, 22);
				if (flag)
				{
					for (int i = 0; i < 20; i++)
					{
						bool flag2 = i == 0;
						if (flag2)
						{
							mAZ_TDCOMP.offset[i].toolsetX = BitConverter.ToInt32(array.Skip(1300 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].toolsetY = BitConverter.ToInt32(array.Skip(1304 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].offsetX = BitConverter.ToInt32(array.Skip(1308 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].offsetZ = BitConverter.ToInt32(array.Skip(1316 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].radius = BitConverter.ToInt32(array.Skip(1328 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].toolnumber = BitConverter.ToInt16(array.Skip(1280 + i * 72).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].suf = (int)array[1282 + i * 72];
						}
						else
						{
							bool flag3 = BitConverter.ToUInt16(array.Skip(i * 72).Take(4).ToArray<byte>(), 0) > 0;
							if (!flag3)
							{
								mAZ_TDCOMP.toollength = i;
								break;
							}
							mAZ_TDCOMP.offset[i].toolsetX = BitConverter.ToInt32(array.Skip(1300 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].toolsetY = BitConverter.ToInt32(array.Skip(1304 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].offsetX = BitConverter.ToInt32(array.Skip(1308 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].offsetZ = BitConverter.ToInt32(array.Skip(1316 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].radius = BitConverter.ToInt32(array.Skip(1328 + i * 72).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].toolnumber = BitConverter.ToInt16(array.Skip(1280 + i * 72).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP.offset[i].suf = (int)array[1282 + i * 72];
						}
					}
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000027 RID: 39 RVA: 0x000068E0 File Offset: 0x00004AE0
		public bool Get_TDDataAll(short tno, ref Mazak.MAZ_TD_COMMON[] mAZ_TDCOMP, ref int toollength, ref byte[] TD_COMMON)
		{
			bool result;
			try
			{
				mAZ_TDCOMP = new Mazak.MAZ_TD_COMMON[20];
				ushort value = 80;
				byte[] sourceArray = new byte[2];
				byte[] sourceArray2 = new byte[]
				{
					(byte)tno
				};
				sourceArray = BitConverter.GetBytes(value).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Array.Copy(sourceArray2, 0, sendData, 8, 1);
				Mazak.socketClient.Send(sendData);
				Thread.Sleep(500);
				byte[] array = new byte[9000];
				bool flag = Mazak.ReceiveData(ref array, 80);
				if (flag)
				{
					TD_COMMON = array;
					for (int i = 0; i < 20; i++)
					{
						bool flag2 = i == 0;
						if (flag2)
						{
							mAZ_TDCOMP[i].toolsetX = BitConverter.ToInt64(array.Skip(1352 + i * 384).Take(8).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].toolsetZ = BitConverter.ToInt64(array.Skip(1360 + i * 384).Take(8).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompX = BitConverter.ToInt32(array.Skip(1308 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompZ = BitConverter.ToInt32(array.Skip(1316 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].diameter = BitConverter.ToInt32(array.Skip(1348 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearX = (int)BitConverter.ToInt16(array.Skip(1444 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearY = (int)BitConverter.ToInt16(array.Skip(1446 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearZ = BitConverter.ToInt32(array.Skip(1448 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompX = (int)BitConverter.ToInt16(array.Skip(1432 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompY = (int)BitConverter.ToInt16(array.Skip(1434 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompZ = BitConverter.ToInt32(array.Skip(1436 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].usetime = BitConverter.ToInt32(array.Skip(1400 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].lifetime = BitConverter.ToInt32(array.Skip(1396 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].usenumber = (ushort)BitConverter.ToInt16(array.Skip(1406 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].lifenumber = (ushort)BitConverter.ToInt16(array.Skip(1404 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].tno = (ushort)BitConverter.ToInt16(array.Skip(1320 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].nom = (int)((ushort)BitConverter.ToInt32(array.Skip(1324 + i * 384).Take(4).ToArray<byte>(), 0));
							mAZ_TDCOMP[i].pkno = (ushort)BitConverter.ToInt16(array.Skip(1332 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].name = array[1322 + i * 384];
							mAZ_TDCOMP[i].part = array[1323 + i * 384];
							mAZ_TDCOMP[i].suf = array[1329 + i * 384];
						}
						else
						{
							bool flag3 = array[1329 + i * 384] > 0;
							if (!flag3)
							{
								toollength = i;
								break;
							}
							mAZ_TDCOMP[i].toolsetX = BitConverter.ToInt64(array.Skip(1352 + i * 384).Take(8).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].toolsetZ = BitConverter.ToInt64(array.Skip(1360 + i * 384).Take(8).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompX = BitConverter.ToInt32(array.Skip(1308 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompZ = BitConverter.ToInt32(array.Skip(1316 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].diameter = BitConverter.ToInt32(array.Skip(1348 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearX = (int)BitConverter.ToInt16(array.Skip(1444 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearY = (int)BitConverter.ToInt16(array.Skip(1446 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].maxwearZ = (int)BitConverter.ToInt16(array.Skip(1448 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompX = (int)BitConverter.ToInt16(array.Skip(1432 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompY = (int)BitConverter.ToInt16(array.Skip(1434 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].wearcompZ = (int)BitConverter.ToInt16(array.Skip(1436 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].usetime = BitConverter.ToInt32(array.Skip(1400 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].lifetime = BitConverter.ToInt32(array.Skip(1396 + i * 384).Take(4).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].usenumber = (ushort)BitConverter.ToInt16(array.Skip(1406 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].lifenumber = (ushort)BitConverter.ToInt16(array.Skip(1404 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].tno = (ushort)BitConverter.ToInt16(array.Skip(1320 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].nom = (int)((ushort)BitConverter.ToInt32(array.Skip(1324 + i * 384).Take(4).ToArray<byte>(), 0));
							mAZ_TDCOMP[i].pkno = (ushort)BitConverter.ToInt16(array.Skip(1332 + i * 384).Take(2).ToArray<byte>(), 0);
							mAZ_TDCOMP[i].name = array[1322 + i * 384];
							mAZ_TDCOMP[i].part = array[1323 + i * 384];
							mAZ_TDCOMP[i].suf = array[1329 + i * 384];
						}
					}
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000028 RID: 40 RVA: 0x00007214 File Offset: 0x00005414
		public bool Set_TDDataAll(short item, byte[] TD_COMMON, double value, short toollength)
		{
			bool result;
			try
			{
				ushort value2 = 81;
				byte[] sourceArray = new byte[2];
				byte[] sourceArray2 = new byte[2];
				sourceArray = BitConverter.GetBytes(value2).ToArray<byte>();
				Array.Copy(sourceArray, 0, TD_COMMON, 0, 2);
				bool flag = item == 1;
				if (flag)
				{
					int num = (int)BitConverter.ToInt16(TD_COMMON.Skip((int)(1432 + toollength * 384)).Take(2).ToArray<byte>(), 0);
					num = (int)(value * 10000.0) + num;
					sourceArray2 = BitConverter.GetBytes((short)num).ToArray<byte>();
					Array.Copy(sourceArray2, 0, TD_COMMON, (int)(1432 + toollength * 384), 2);
				}
				else
				{
					bool flag2 = item == 2;
					if (flag2)
					{
						int num2 = (int)BitConverter.ToInt16(TD_COMMON.Skip((int)(1434 + toollength * 384)).Take(2).ToArray<byte>(), 0);
						num2 = (int)(value * 10000.0) + num2;
						sourceArray2 = BitConverter.GetBytes((short)num2).ToArray<byte>();
						Array.Copy(sourceArray2, 0, TD_COMMON, (int)(1434 + toollength * 384), 2);
					}
					else
					{
						bool flag3 = item == 3;
						if (flag3)
						{
							int num3 = (int)BitConverter.ToInt16(TD_COMMON.Skip((int)(1436 + toollength * 384)).Take(2).ToArray<byte>(), 0);
							num3 = (int)(value * 10000.0) + num3;
							sourceArray2 = BitConverter.GetBytes((short)num3).ToArray<byte>();
							Array.Copy(sourceArray2, 0, TD_COMMON, (int)(1436 + toollength * 384), 2);
						}
					}
				}
				TD_COMMON[66] = 1;
				Mazak.socketClient.Send(TD_COMMON);
				Thread.Sleep(500);
				byte[] array = new byte[9000];
				bool flag4 = Mazak.ReceiveData(ref array, 81);
				if (flag4)
				{
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000029 RID: 41 RVA: 0x000073F8 File Offset: 0x000055F8
		public bool Set_Macro(short address, double value)
		{
			bool result;
			try
			{
				ushort value2 = 54;
				byte[] sourceArray = new byte[2];
				byte[] bytes = BitConverter.GetBytes(address);
				sourceArray = BitConverter.GetBytes(value2).ToArray<byte>();
				byte[] sendData = this.SendData;
				Array.Copy(sourceArray, 0, sendData, 0, 2);
				Array.Copy(bytes, 0, sendData, 8, 2);
				Array.Copy(bytes, 0, sendData, 12, 2);
				Array.Copy(BitConverter.GetBytes(8).ToArray<byte>(), 0, sendData, 36, 1);
				Array.Copy(BitConverter.GetBytes(value), 0, sendData, 256, 8);
				Mazak.socketClient.Send(sendData);
				byte[] array = new byte[6000];
				bool flag = Mazak.ReceiveData(ref array, 54);
				if (flag)
				{
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x0600002A RID: 42 RVA: 0x000074C4 File Offset: 0x000056C4
		private static bool ReceiveData(ref byte[] bytedate, int head = 0)
		{
			bool result;
			try
			{
				Thread.Sleep(100);
				byte[] array = new byte[9000];
				Mazak.socketClient.ReceiveTimeout = 3000;
				int count = Mazak.socketClient.Receive(array);
				bool flag = (int)BitConverter.ToUInt16(array.Skip(0).Take(2).ToArray<byte>(), 0) == head;
				if (flag)
				{
					bytedate = array.Skip(0).Take(count).ToArray<byte>();
					result = true;
				}
				else
				{
					result = false;
				}
			}
			catch (Exception ex)
			{
				result = false;
			}
			return result;
		}

		// Token: 0x04000059 RID: 89
		public static byte[] FIRST_HAND_SHANK;

		// Token: 0x0400005A RID: 90
		private static Socket socketClient;

		// Token: 0x0400005B RID: 91
		public static int toolmax = 20;

		// Token: 0x0400005C RID: 92
		public Mazak.MAZ_TDCOMP[] offset = new Mazak.MAZ_TDCOMP[20];

		// Token: 0x02000007 RID: 7
		public struct MTC_ONE_RUNNING_INFO
		{
			// Token: 0x04000060 RID: 96
			public string dummy;

			// Token: 0x04000061 RID: 97
			public short ncmode;

			// Token: 0x04000062 RID: 98
			public short ncsts;

			// Token: 0x04000063 RID: 99
			public short tno;

			// Token: 0x04000064 RID: 100
			public byte suffix;

			// Token: 0x04000065 RID: 101
			public byte sufattr;

			// Token: 0x04000066 RID: 102
			public short figA;

			// Token: 0x04000067 RID: 103
			public short figB;

			// Token: 0x04000068 RID: 104
			public int nom;

			// Token: 0x04000069 RID: 105
			public int gno;

			// Token: 0x0400006A RID: 106
			public short sp_override;

			// Token: 0x0400006B RID: 107
			public short ax_override;

			// Token: 0x0400006C RID: 108
			public short rpid_override;

			// Token: 0x0400006D RID: 109
			public short almno;

			// Token: 0x0400006E RID: 110
			public int alm_fore_color;

			// Token: 0x0400006F RID: 111
			public int alm_back_color;

			// Token: 0x04000070 RID: 112
			public short prtcnt;

			// Token: 0x04000071 RID: 113
			public short prtcnt_clamp;

			// Token: 0x04000072 RID: 114
			public int autotim;

			// Token: 0x04000073 RID: 115
			public int cuttim;

			// Token: 0x04000074 RID: 116
			public int totaltim;
		}

		// Token: 0x02000008 RID: 8
		public struct MTC_ONE_AXIS_INFO
		{
			// Token: 0x04000075 RID: 117
			public double pos_x;

			// Token: 0x04000076 RID: 118
			public double pos_z;

			// Token: 0x04000077 RID: 119
			public double mc_pos_x;

			// Token: 0x04000078 RID: 120
			public double mc_pos_z;

			// Token: 0x04000079 RID: 121
			public double load;

			// Token: 0x0400007A RID: 122
			public string axisname_x;

			// Token: 0x0400007B RID: 123
			public string axisname_z;
		}

		// Token: 0x02000009 RID: 9
		public struct MTC_ONE_PROGRAM_INFO
		{
			// Token: 0x0400007C RID: 124
			public string comment;

			// Token: 0x0400007D RID: 125
			public string wno;

			// Token: 0x0400007E RID: 126
			public int subwno;

			// Token: 0x0400007F RID: 127
			public int blockno;

			// Token: 0x04000080 RID: 128
			public int seqno;

			// Token: 0x04000081 RID: 129
			public int unitno;
		}

		// Token: 0x0200000A RID: 10
		public struct MTC_ONE_SPINDLE_INFO
		{
			// Token: 0x04000082 RID: 130
			public double rot;

			// Token: 0x04000083 RID: 131
			public double load;

			// Token: 0x04000084 RID: 132
			public double temp;
		}

		// Token: 0x0200000B RID: 11
		public struct MAZ_TDCOMP
		{
			// Token: 0x04000085 RID: 133
			public uint sts;

			// Token: 0x04000086 RID: 134
			public int toolsetX;

			// Token: 0x04000087 RID: 135
			public int toolsetZ;

			// Token: 0x04000088 RID: 136
			public int toolsetY;

			// Token: 0x04000089 RID: 137
			public int offsetX;

			// Token: 0x0400008A RID: 138
			public int offsetY;

			// Token: 0x0400008B RID: 139
			public int offsetZ;

			// Token: 0x0400008C RID: 140
			public int lengthA;

			// Token: 0x0400008D RID: 141
			public int lengthB;

			// Token: 0x0400008E RID: 142
			public int radius;

			// Token: 0x0400008F RID: 143
			public int LenOffset;

			// Token: 0x04000090 RID: 144
			public int RadOffset;

			// Token: 0x04000091 RID: 145
			public int LenCompno;

			// Token: 0x04000092 RID: 146
			public int RadCompno;

			// Token: 0x04000093 RID: 147
			public short toolnumber;

			// Token: 0x04000094 RID: 148
			public int suf;

			// Token: 0x04000095 RID: 149
			public string dummy;
		}

		// Token: 0x0200000C RID: 12
		public struct MAZ_TDCOMPALL
		{
			// Token: 0x04000096 RID: 150
			public int toollength;

			// Token: 0x04000097 RID: 151
			public Mazak.MAZ_TDCOMP[] offset;
		}

		// Token: 0x0200000D RID: 13
		public struct MAZ_TD_COMMON
		{
			// Token: 0x04000098 RID: 152
			public ushort tno;

			// Token: 0x04000099 RID: 153
			public byte name;

			// Token: 0x0400009A RID: 154
			public byte part;

			// Token: 0x0400009B RID: 155
			public int nom;

			// Token: 0x0400009C RID: 156
			public byte itf;

			// Token: 0x0400009D RID: 157
			public byte suf;

			// Token: 0x0400009E RID: 158
			public byte sufatr;

			// Token: 0x0400009F RID: 159
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
			public string dummy1;

			// Token: 0x040000A0 RID: 160
			public ushort pkno;

			// Token: 0x040000A1 RID: 161
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
			public string dummy2;

			// Token: 0x040000A2 RID: 162
			public int lengthA;

			// Token: 0x040000A3 RID: 163
			public int lengthB;

			// Token: 0x040000A4 RID: 164
			public int lengthC;

			// Token: 0x040000A5 RID: 165
			public int diameter;

			// Token: 0x040000A6 RID: 166
			public long toolsetX;

			// Token: 0x040000A7 RID: 167
			public long toolsetZ;

			// Token: 0x040000A8 RID: 168
			public ushort rotate;

			// Token: 0x040000A9 RID: 169
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy3;

			// Token: 0x040000AA RID: 170
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 9)]
			public string mtr;

			// Token: 0x040000AB RID: 171
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 7)]
			public string dummy4;

			// Token: 0x040000AC RID: 172
			public short holdno;

			// Token: 0x040000AD RID: 173
			public short holdtype;

			// Token: 0x040000AE RID: 174
			public int lifetime;

			// Token: 0x040000AF RID: 175
			public int usetime;

			// Token: 0x040000B0 RID: 176
			public ushort lifenumber;

			// Token: 0x040000B1 RID: 177
			public ushort usenumber;

			// Token: 0x040000B2 RID: 178
			public int gno;

			// Token: 0x040000B3 RID: 179
			public int compno;

			// Token: 0x040000B4 RID: 180
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 11)]
			public string idno;

			// Token: 0x040000B5 RID: 181
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 5)]
			public string dummy5;

			// Token: 0x040000B6 RID: 182
			public int wearcompX;

			// Token: 0x040000B7 RID: 183
			public int wearcompZ;

			// Token: 0x040000B8 RID: 184
			public int wearcompY;

			// Token: 0x040000B9 RID: 185
			public int maxwearX;

			// Token: 0x040000BA RID: 186
			public int maxwearZ;

			// Token: 0x040000BB RID: 187
			public int maxwearY;

			// Token: 0x040000BC RID: 188
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 17)]
			public string model;

			// Token: 0x040000BD RID: 189
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 7)]
			public string dummy6;

			// Token: 0x040000BE RID: 190
			public int teyecompX;

			// Token: 0x040000BF RID: 191
			public int teyecompZ;

			// Token: 0x040000C0 RID: 192
			public int holdlength;

			// Token: 0x040000C1 RID: 193
			public int holddiam;

			// Token: 0x040000C2 RID: 194
			public int sts;

			// Token: 0x040000C3 RID: 195
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 28)]
			public string dummy7;
		}

		// Token: 0x0200000E RID: 14
		public struct MAZ_TD_TURNING_COMMON
		{
			// Token: 0x040000C4 RID: 196
			public short angle;

			// Token: 0x040000C5 RID: 197
			public byte index_select;

			// Token: 0x040000C6 RID: 198
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
			public string dummy1;

			// Token: 0x040000C7 RID: 199
			public int easycompX;

			// Token: 0x040000C8 RID: 200
			public int easycompZ;

			// Token: 0x040000C9 RID: 201
			public int easycompY;

			// Token: 0x040000CA RID: 202
			public int conscompX;

			// Token: 0x040000CB RID: 203
			public int conscompZ;

			// Token: 0x040000CC RID: 204
			public int conscompY;

			// Token: 0x040000CD RID: 205
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
			public string dummy2;
		}

		// Token: 0x0200000F RID: 15
		public struct MAZ_TD_MILLING_COMMON
		{
			// Token: 0x040000CE RID: 206
			public int lengcomp;

			// Token: 0x040000CF RID: 207
			public int maxrotate;

			// Token: 0x040000D0 RID: 208
			public short tipangle;

			// Token: 0x040000D1 RID: 209
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
			public string dummy1;

			// Token: 0x040000D2 RID: 210
			public int radcomp;

			// Token: 0x040000D3 RID: 211
			public int radcomp_no;

			// Token: 0x040000D4 RID: 212
			public int lencomp;

			// Token: 0x040000D5 RID: 213
			public int lencomp_no;

			// Token: 0x040000D6 RID: 214
			public int anglecomp;

			// Token: 0x040000D7 RID: 215
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
			public string dummy2;
		}

		// Token: 0x02000010 RID: 16
		public struct MAZ_TD_GENERAL
		{
			// Token: 0x040000D8 RID: 216
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000D9 RID: 217
			public int cutang;

			// Token: 0x040000DA RID: 218
			public int edgang;

			// Token: 0x040000DB RID: 219
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
			public string dummy1;

			// Token: 0x040000DC RID: 220
			public int holdwidth1;

			// Token: 0x040000DD RID: 221
			public int holdwidth2;

			// Token: 0x040000DE RID: 222
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy2;

			// Token: 0x040000DF RID: 223
			public int twidth;

			// Token: 0x040000E0 RID: 224
			public byte lbbno;

			// Token: 0x040000E1 RID: 225
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 39)]
			public string dummy3;
		}

		// Token: 0x02000011 RID: 17
		public struct MAZ_TD_GROOVE
		{
			// Token: 0x040000E2 RID: 226
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000E3 RID: 227
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x040000E4 RID: 228
			public int holdwidth1;

			// Token: 0x040000E5 RID: 229
			public int holdwidth2;

			// Token: 0x040000E6 RID: 230
			public int edgwidth;

			// Token: 0x040000E7 RID: 231
			public int twidth;

			// Token: 0x040000E8 RID: 232
			public int grvdepth;

			// Token: 0x040000E9 RID: 233
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
			public string dummy2;
		}

		// Token: 0x02000012 RID: 18
		public struct MAZ_TD_THREAD
		{
			// Token: 0x040000EA RID: 234
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000EB RID: 235
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x040000EC RID: 236
			public int holdwidth1;

			// Token: 0x040000ED RID: 237
			public int holdwidth2;

			// Token: 0x040000EE RID: 238
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy2;

			// Token: 0x040000EF RID: 239
			public int twidth;

			// Token: 0x040000F0 RID: 240
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
			public string dummy3;
		}

		// Token: 0x02000013 RID: 19
		public struct MAZ_TD_T_DRILL
		{
			// Token: 0x040000F1 RID: 241
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000F2 RID: 242
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy1;

			// Token: 0x040000F3 RID: 243
			public int edgang;

			// Token: 0x040000F4 RID: 244
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
			public string dummy2;
		}

		// Token: 0x02000014 RID: 20
		public struct MAZ_TD_T_TAP
		{
			// Token: 0x040000F5 RID: 245
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000F6 RID: 246
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
			public string dummy1;

			// Token: 0x040000F7 RID: 247
			public ushort taprfeed;

			// Token: 0x040000F8 RID: 248
			public byte taptype;

			// Token: 0x040000F9 RID: 249
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 61)]
			public string dummy2;
		}

		// Token: 0x02000015 RID: 21
		public struct MAZ_TD_T_SPECIAL
		{
			// Token: 0x040000FA RID: 250
			public Mazak.MAZ_TD_TURNING_COMMON td_turning_common;

			// Token: 0x040000FB RID: 251
			public int cutang;

			// Token: 0x040000FC RID: 252
			public int edgang;

			// Token: 0x040000FD RID: 253
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy1;

			// Token: 0x040000FE RID: 254
			public int holdwidth1;

			// Token: 0x040000FF RID: 255
			public int holdwidth2;

			// Token: 0x04000100 RID: 256
			public int twidth;

			// Token: 0x04000101 RID: 257
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 48)]
			public string dummy2;
		}

		// Token: 0x02000016 RID: 22
		public struct MAZ_TD_ENDMILL
		{
			// Token: 0x04000102 RID: 258
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000103 RID: 259
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x04000104 RID: 260
			public byte horsepower;

			// Token: 0x04000105 RID: 261
			public byte thrust;

			// Token: 0x04000106 RID: 262
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy2;

			// Token: 0x04000107 RID: 263
			public int teeth;

			// Token: 0x04000108 RID: 264
			public int cutdepth;

			// Token: 0x04000109 RID: 265
			public int cornerR;

			// Token: 0x0400010A RID: 266
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
			public string dummy3;
		}

		// Token: 0x02000017 RID: 23
		public struct MAZ_TD_FACEMILL
		{
			// Token: 0x0400010B RID: 267
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400010C RID: 268
			public int cutang;

			// Token: 0x0400010D RID: 269
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
			public string dummy1;

			// Token: 0x0400010E RID: 270
			public byte horsepower;

			// Token: 0x0400010F RID: 271
			public byte thrust;

			// Token: 0x04000110 RID: 272
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy2;

			// Token: 0x04000111 RID: 273
			public int teeth;

			// Token: 0x04000112 RID: 274
			public int cutdepth;

			// Token: 0x04000113 RID: 275
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
			public string dummy3;
		}

		// Token: 0x02000018 RID: 24
		public struct MAZ_TD_CHAMFER
		{
			// Token: 0x04000114 RID: 276
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000115 RID: 277
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x04000116 RID: 278
			public byte horsepower;

			// Token: 0x04000117 RID: 279
			public byte thrust;

			// Token: 0x04000118 RID: 280
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy2;

			// Token: 0x04000119 RID: 281
			public int teeth;

			// Token: 0x0400011A RID: 282
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy3;

			// Token: 0x0400011B RID: 283
			public int chamferangle;

			// Token: 0x0400011C RID: 284
			public int minimumdia;

			// Token: 0x0400011D RID: 285
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
			public string dummy4;
		}

		// Token: 0x02000019 RID: 25
		public struct MAZ_TD_B_ENDMILL
		{
			// Token: 0x0400011E RID: 286
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400011F RID: 287
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x04000120 RID: 288
			public byte horsepower;

			// Token: 0x04000121 RID: 289
			public byte thrust;

			// Token: 0x04000122 RID: 290
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy2;

			// Token: 0x04000123 RID: 291
			public int teeth;

			// Token: 0x04000124 RID: 292
			public int cutdepth;

			// Token: 0x04000125 RID: 293
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
			public string dummy3;
		}

		// Token: 0x0200001A RID: 26
		public struct MAZ_TD_SPECIAL
		{
			// Token: 0x04000126 RID: 294
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000127 RID: 295
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x04000128 RID: 296
			public byte horsepower;

			// Token: 0x04000129 RID: 297
			public byte thrust;

			// Token: 0x0400012A RID: 298
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 54)]
			public string dummy2;
		}

		// Token: 0x0200001B RID: 27
		public struct MAZ_TD_SENSOR_MILL
		{
			// Token: 0x0400012B RID: 299
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400012C RID: 300
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 72)]
			public string dummy;
		}

		// Token: 0x0200001C RID: 28
		public struct MAZ_TD_CHIP_VAC
		{
			// Token: 0x0400012D RID: 301
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400012E RID: 302
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 72)]
			public string dummy;
		}

		// Token: 0x0200001D RID: 29
		public struct MAZ_TD_SPOT
		{
			// Token: 0x0400012F RID: 303
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000130 RID: 304
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy1;

			// Token: 0x04000131 RID: 305
			public int edgang;

			// Token: 0x04000132 RID: 306
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
			public string dummy2;
		}

		// Token: 0x0200001E RID: 30
		public struct MAZ_TD_DRILL
		{
			// Token: 0x04000133 RID: 307
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000134 RID: 308
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy1;

			// Token: 0x04000135 RID: 309
			public int edgang;

			// Token: 0x04000136 RID: 310
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
			public string dummy2;

			// Token: 0x04000137 RID: 311
			public byte horsepower;

			// Token: 0x04000138 RID: 312
			public byte thrust;

			// Token: 0x04000139 RID: 313
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
			public string dummy3;

			// Token: 0x0400013A RID: 314
			public int teeth;

			// Token: 0x0400013B RID: 315
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
			public string dummy4;

			// Token: 0x0400013C RID: 316
			public ushort threshold;

			// Token: 0x0400013D RID: 317
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 38)]
			public string dummy5;
		}

		// Token: 0x0200001F RID: 31
		public struct MAZ_TD_BACK_FACE
		{
			// Token: 0x0400013E RID: 318
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400013F RID: 319
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x04000140 RID: 320
			public byte horsepower;

			// Token: 0x04000141 RID: 321
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 55)]
			public string dummy2;
		}

		// Token: 0x02000020 RID: 32
		public struct MAZ_TD_REAMER
		{
			// Token: 0x04000142 RID: 322
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000143 RID: 323
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 72)]
			public string dummy;
		}

		// Token: 0x02000021 RID: 33
		public struct MAZ_TD_TAP
		{
			// Token: 0x04000144 RID: 324
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x04000145 RID: 325
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
			public string dummy1;

			// Token: 0x04000146 RID: 326
			public ushort taprfeed;

			// Token: 0x04000147 RID: 327
			public byte taptype;

			// Token: 0x04000148 RID: 328
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 61)]
			public string dummy2;
		}

		// Token: 0x02000022 RID: 34
		public struct MAZ_TD_BORING
		{
			// Token: 0x04000149 RID: 329
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400014A RID: 330
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x0400014B RID: 331
			public byte horsepower;

			// Token: 0x0400014C RID: 332
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 55)]
			public string dummy2;
		}

		// Token: 0x02000023 RID: 35
		public struct MAZ_TD_BACK_BOR
		{
			// Token: 0x0400014D RID: 333
			public Mazak.MAZ_TD_MILLING_COMMON td_milling_common;

			// Token: 0x0400014E RID: 334
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string dummy1;

			// Token: 0x0400014F RID: 335
			public byte horsepower;

			// Token: 0x04000150 RID: 336
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 55)]
			public string dummy2;
		}

		// Token: 0x02000024 RID: 36
		public struct MAZ_TD_VARIOUS
		{
			// Token: 0x04000151 RID: 337
			public Mazak.MAZ_TD_GENERAL td_general;

			// Token: 0x04000152 RID: 338
			public Mazak.MAZ_TD_GROOVE td_groove;

			// Token: 0x04000153 RID: 339
			public Mazak.MAZ_TD_THREAD td_thread;

			// Token: 0x04000154 RID: 340
			public Mazak.MAZ_TD_T_DRILL td_t_drill;

			// Token: 0x04000155 RID: 341
			public Mazak.MAZ_TD_T_TAP td_t_tap;

			// Token: 0x04000156 RID: 342
			public Mazak.MAZ_TD_T_SPECIAL td_t_special;

			// Token: 0x04000157 RID: 343
			public Mazak.MAZ_TD_ENDMILL td_endmill;

			// Token: 0x04000158 RID: 344
			public Mazak.MAZ_TD_FACEMILL td_facemill;

			// Token: 0x04000159 RID: 345
			public Mazak.MAZ_TD_CHAMFER td_chamfer;

			// Token: 0x0400015A RID: 346
			public Mazak.MAZ_TD_B_ENDMILL td_b_endmill;

			// Token: 0x0400015B RID: 347
			public Mazak.MAZ_TD_SPECIAL td_special;

			// Token: 0x0400015C RID: 348
			public Mazak.MAZ_TD_SENSOR_MILL td_sensor_mill;

			// Token: 0x0400015D RID: 349
			public Mazak.MAZ_TD_CHIP_VAC td_chip_vac;

			// Token: 0x0400015E RID: 350
			public Mazak.MAZ_TD_SPOT td_spot;

			// Token: 0x0400015F RID: 351
			public Mazak.MAZ_TD_DRILL td_drill;

			// Token: 0x04000160 RID: 352
			public Mazak.MAZ_TD_BACK_FACE td_back_face;

			// Token: 0x04000161 RID: 353
			public Mazak.MAZ_TD_REAMER td_reamer;

			// Token: 0x04000162 RID: 354
			public Mazak.MAZ_TD_TAP td_tap;

			// Token: 0x04000163 RID: 355
			public Mazak.MAZ_TD_BORING td_boring;

			// Token: 0x04000164 RID: 356
			public Mazak.MAZ_TD_BACK_BOR td_bbbar;
		}

		// Token: 0x02000025 RID: 37
		public struct MAZ_TD
		{
			// Token: 0x04000165 RID: 357
			public int avf;

			// Token: 0x04000166 RID: 358
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
			public string dummy;

			// Token: 0x04000167 RID: 359
			public Mazak.MAZ_TD_COMMON td_common;

			// Token: 0x04000168 RID: 360
			public Mazak.MAZ_TD_VARIOUS td_various;
		}

		// Token: 0x02000026 RID: 38
		public struct MAZ_TDALL
		{
			// Token: 0x04000169 RID: 361
			[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.Struct)]
			public Mazak.MAZ_TD[] tdata;
		}

		// Token: 0x02000027 RID: 39
		public struct MAZ_TD_ERROR
		{
			// Token: 0x0400016A RID: 362
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 7)]
			public string failure;

			// Token: 0x0400016B RID: 363
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 7)]
			public string dummy1;

			// Token: 0x0400016C RID: 364
			public uint err_flg1;

			// Token: 0x0400016D RID: 365
			public uint err_flg2;

			// Token: 0x0400016E RID: 366
			public uint err_flg3;

			// Token: 0x0400016F RID: 367
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
			public string dummy2;
		}

		// Token: 0x02000028 RID: 40
		public struct MAZ_TD_ERRORALL
		{
			// Token: 0x04000170 RID: 368
			public Mazak.MAZ_TD_ERROR[] tdata_err;
		}
	}
}
